<template>
<div class="guaranteeActionSheet">
  <van-action-sheet v-model="show" >
    <template #default>
      <div class="topBlank"></div>
      <div class="titleRow flex flex-center">
        <img class="marginAuto0" src="@/assets/img/goodsMore/guarantee1.png">
        <p>天猫基础保障</p>
      </div>
      <div>
        <div class="content flex" v-for="(item,index) in guarantee" :key="'guarantee'+index">
          <img src="@/assets/img/goodsMore/guarantee2.png">
          <div>
            <p class="title">{{item.title}}</p>
            <p class="des">{{item.des}}</p>
          </div>
        </div>

      </div>
      <div class="blank">

      </div>
      <div class="ok textAlignCenter">
        <button @click="onButtonClick">完成</button>
      </div>
    </template>
  </van-action-sheet>
</div>
</template>

<script>
import Vue from 'vue';
import { ActionSheet } from 'vant';

Vue.use(ActionSheet);
export default {
  name: "guaranteeActionSheet",
  props:{
    guarantee:{
      type:Array
    }
  },
  data(){
    return{
      show:false
    }
  },
  methods:{
    onButtonClick(){
      this.show=false;
    }
  },
}
</script>

<style lang="less" scoped>

.titleRow{
  padding: .8rem 0 .3rem 0;
  img{
    width: .5rem;
    height: .5rem;
    margin-right: .2rem;
  }
  p{
    font-size: .45rem;
    font-weight: 550;
  }
}
.content{
  padding: .4rem;
  img{
    margin-top: .05rem;
    width: .5rem;
    height: .4rem;
    margin-right: .4rem;
  }
  .title{
    font-weight: 550;
    font-size: .4rem;
    padding:  0 0 .3rem 0;
  }
  .des{
    font-size: .4rem;
    color: #999999;
  }
}
button {
  font-size: .4rem;
  color: #fff;
  padding: .2rem 4rem;
  background-color: #FF9901;
  border: none;
  border-radius: 1rem;
}
.ok{
  background-color: #fff;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  padding: .2rem 0;
}
.topBlank{
  height: .8rem;
  width: 10rem;
  background-color: #fff;
  border-radius: .4rem .4rem 0 0;
  position: fixed;
}
</style>